//
//  ViewController.m
//  CAShapeLayerVoiceView
//
//  Created by 宇宙执政 on 16/11/4.
//  Copyright © 2016年 yujianbinMAC. All rights reserved.
//

#import "ViewController.h"
#import "UNIVoiceView.h"

@interface ViewController ()

@property (nonatomic, strong)UNIVoiceView *vView;
@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    UIView *view = [[UIView alloc] initWithFrame:CGRectMake(50, 100, 100, 100)];
    view.backgroundColor = [UIColor grayColor];
    
    _vView = [[UNIVoiceView alloc] initWithFrame:CGRectMake(25,40, 50, 50) lineWith:2.0 lineColor:[UIColor whiteColor] solidColor:[UIColor redColor] isSolid:YES];
    _vView.backgroundColor = [UIColor clearColor];
    [_vView updateVoiceViewWithVolume:0];
    [view addSubview:_vView];
    
    [self.view addSubview:view];
    
}

- (IBAction)sliAction:(UISlider *)sender {
    
    [_vView updateVoiceViewWithVolume:sender.value];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
